package com.xneure.code.excel;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

public class ExcelUtil {

	public static void readExcel(String filePath, ExcelImportHandler handler) {
		readExcel(new File(filePath), handler);
	}

	public static void readExcel(File file, ExcelImportHandler handler) {
		try {
			readExcel(new FileInputStream(file), handler);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	public static void readExcel(InputStream is, ExcelImportHandler handler) {
		
		new ExcelImportProvide(handler).loadData(is);
	}
}
